import { Component, OnInit } from '@angular/core';
import { Router,RouterModule } from '@angular/router';

@Component({
  selector: 'app-header',
  imports: [RouterModule],
  templateUrl: './app-header.component.html',
  styleUrl: './app-header.component.css'
})

export class AppHeaderComponent implements OnInit {
  constructor(private router: Router) {}

  ngOnInit() {}

  changeRoute(evt: MouseEvent, name: string) {
    evt.preventDefault();

    let navcfg = [{ outlets: { secondary: name } }];

    this.router.navigate(navcfg, {
      skipLocationChange: false,
    });
  }
}

